#SingleInstance, Force
SendMode Input
SetWorkingDir, %A_ScriptDir%
; call other script without program block



/*
Run(A_ScriptDir "/THIRD.ahk msg a b c")
*/
#UseHook, On

argnum = %0%          ; arg num
method = %1%        ; method name
; M("method: " method "`nargs num: " argnum)

If(argnum == 1) {
    Method(method)
}
Else {
    arr := []
    Loop, %argnum% {
        arr.Insert(%A_Index%)
    }
    Method(arr[1], A_Sub(arr, 2, argnum)*)
}
ExitApp



#Include lib/msg.ahk
#Include GUI.ahk
